# Python 2.6.4
# Project Euler, Problem 120
# Copyright 2010 Talha Zaman

print sum(a*(a-1) if a%2 else a*(a-2) for a in range(3,1001))

#from itertools import cycle, izip
#print sum(a*(a-b) for a,b in izip(range(3,1001), cycle([1,2])))

#print sum(a*(a-2+a%2) for a in range(3,1001))

def rem(a,n):
    print (pow(a-1,n,a*a)+pow(a+1,n,a*a))%(a*a)
